3.1516 \(\int \frac{c+d x}{(a-b x) (a+b x)} \, dx\)

Optimal. Leaf size=49 \[ \frac{(b c-a d) \log (a+b x)}{2 a b^2}-\frac{(a d+b c) \log (a-b x)}{2 a b^2} \]

[Out]

-((b*c + a*d)*Log[a - b*x])/(2*a*b^2) + ((b*c - a*d)*Log[a + b*x])/(2*a*b^2)

_______________________________________________________________________________________

Rubi [A]  time = 0.0867903, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048 \[ \frac{(b c-a d) \log (a+b x)}{2 a b^2}-\frac{(a d+b c) \log (a-b x)}{2 a b^2} \]

Antiderivative was successfully verified.

[In]  Int[(c + d*x)/((a - b*x)*(a + b*x)),x]

[Out]

-((b*c + a*d)*Log[a - b*x])/(2*a*b^2) + ((b*c - a*d)*Log[a + b*x])/(2*a*b^2)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 10.263, size = 41, normalized size = 0.84 \[ - \frac{\left (a d - b c\right ) \log{\left (a + b x \right )}}{2 a b^{2}} - \frac{\left (a d + b c\right ) \log{\left (a - b x \right )}}{2 a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d*x+c)/(-b*x+a)/(b*x+a),x)

[Out]

-(a*d - b*c)*log(a + b*x)/(2*a*b**2) - (a*d + b*c)*log(a - b*x)/(2*a*b**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0135458, size = 37, normalized size = 0.76 \[ \frac{c \tanh ^{-1}\left (\frac{b x}{a}\right )}{a b}-\frac{d \log \left (a^2-b^2 x^2\right )}{2 b^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(c + d*x)/((a - b*x)*(a + b*x)),x]

[Out]

(c*ArcTanh[(b*x)/a])/(a*b) - (d*Log[a^2 - b^2*x^2])/(2*b^2)

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 60, normalized size = 1.2 \[ -{\frac{d\ln \left ( bx+a \right ) }{2\,{b}^{2}}}+{\frac{\ln \left ( bx+a \right ) c}{2\,ab}}-{\frac{\ln \left ( bx-a \right ) d}{2\,{b}^{2}}}-{\frac{\ln \left ( bx-a \right ) c}{2\,ab}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d*x+c)/(-b*x+a)/(b*x+a),x)

[Out]

-1/2*d/b^2*ln(b*x+a)+1/2/a/b*ln(b*x+a)*c-1/2/b^2*ln(b*x-a)*d-1/2/a/b*ln(b*x-a)*c

_______________________________________________________________________________________

Maxima [A]  time = 1.34616, size = 62, normalized size = 1.27 \[ \frac{{\left (b c - a d\right )} \log \left (b x + a\right )}{2 \, a b^{2}} - \frac{{\left (b c + a d\right )} \log \left (b x - a\right )}{2 \, a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(d*x + c)/((b*x + a)*(b*x - a)),x, algorithm="maxima")

[Out]

1/2*(b*c - a*d)*log(b*x + a)/(a*b^2) - 1/2*(b*c + a*d)*log(b*x - a)/(a*b^2)

_______________________________________________________________________________________

Fricas [A]  time = 0.20685, size = 55, normalized size = 1.12 \[ \frac{{\left (b c - a d\right )} \log \left (b x + a\right ) -{\left (b c + a d\right )} \log \left (b x - a\right )}{2 \, a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(d*x + c)/((b*x + a)*(b*x - a)),x, algorithm="fricas")

[Out]

1/2*((b*c - a*d)*log(b*x + a) - (b*c + a*d)*log(b*x - a))/(a*b^2)

_______________________________________________________________________________________

Sympy [A]  time = 0.912594, size = 71, normalized size = 1.45 \[ - \frac{\left (a d - b c\right ) \log{\left (x + \frac{a^{2} d - a \left (a d - b c\right )}{b^{2} c} \right )}}{2 a b^{2}} - \frac{\left (a d + b c\right ) \log{\left (x + \frac{a^{2} d - a \left (a d + b c\right )}{b^{2} c} \right )}}{2 a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x+c)/(-b*x+a)/(b*x+a),x)

[Out]

-(a*d - b*c)*log(x + (a**2*d - a*(a*d - b*c))/(b**2*c))/(2*a*b**2) - (a*d + b*c)
*log(x + (a**2*d - a*(a*d + b*c))/(b**2*c))/(2*a*b**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.207999, size = 65, normalized size = 1.33 \[ \frac{{\left (b c - a d\right )}{\rm ln}\left ({\left | b x + a \right |}\right )}{2 \, a b^{2}} - \frac{{\left (b c + a d\right )}{\rm ln}\left ({\left | b x - a \right |}\right )}{2 \, a b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(d*x + c)/((b*x + a)*(b*x - a)),x, algorithm="giac")

[Out]

1/2*(b*c - a*d)*ln(abs(b*x + a))/(a*b^2) - 1/2*(b*c + a*d)*ln(abs(b*x - a))/(a*b
^2)